package icasue.tools.sqlhelper.core.providers;

import icasue.reflect.annotations.NotNull;

import java.util.List;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/11/18 下午4:34
 * @UpdateDate:
 * @Description:
 */
public interface InsertSqlProvider<JavaType extends Object> {
    /**
     * 单记录插入，插入所有列.
     * @return
     */
    String insert(@NotNull JavaType inst) throws Throwable;

    /**
     * 多记录插入，插入所有列.
     * @param instMulti
     * @return
     * @throws Throwable
     */
    String insertMulti(@NotNull List<JavaType> instMulti) throws Throwable;

    /**
     * 单记录插入，仅插入不为null的列.
     * @return
     */
    String insertSmart(@NotNull JavaType inst) throws Throwable;

    /**
     * 多记录插入，仅插入不为null的列.
     * @param instMulti
     * @return
     * @throws Throwable
     */
    String insertSmartMulti(@NotNull List<JavaType> instMulti) throws Throwable;
}
